<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>元素显示隐藏练手</title>
		<style>
			.button1{
				width: 130px;
				height: 35px;
				background-color: cornflowerblue;
				color: white;
				border: 0;
				
			}
			.button1:hover{
				background-color: #00FF00;
			}
			#photo{
				margin-left: 10%;
				width: 80%;
			}
		</style>
<script>
	
	function xianshi(){
		var a = document.getElementById("photo");
		a.style.display="block"
	}
	function yingcang(){
		var a = document.getElementById("photo");
		a.style.display="none"
	}
</script>
	</head>
	<body onload="yingcang()">
		<h1 align="center">
			<font size="7" color="#0000FF"> 帅哥 </font>
		</h1>
		<br />
		<input type="button" value="显示" class="button1" style="margin-left: 43%;" onclick="xianshi()"/>
		<input type="button" value="隐藏" class="button1" onclick="yingcang()"/>
		<br />
		<img src="../psb.jpg" id="photo" />

	</body>
</html>
